﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SeguroSoft.Models.ContenedorServicioTecnico>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Index</h2>

    <%
        Dictionary<string,List<string>> marcas=Model.MarcasModelos;
        
        %>
    <div class="content">
        <div id="combo_zone9" style="width: 500px; height: 200px;">
          
            <div class="tipo" align="right")>
                <form action="/ServicioTecnico/IndexConMarcas" method="post">
                Marca:
            
                <select style='width: 120px;' id="combo_zone1" name="marca" onchange="this.form.submit()" >
                    <option value="NA"></option>
                    <%  foreach (string mar in marcas.Keys){ %>
                    <option value="<%= Html.Encode(mar)%>" <%if (Model.MarcaSeleccionada.Equals(mar)){%>selected<%}%> "><%= Html.Encode(mar)%> </option> 
                    <% } %>
                    
         
            </select>
            </form>
               </div>
            <form action="/ServicioTecnico/MostrasServiciosTecnicos" method="post"> 
            <div class="tipoa" align="right">
                Modelo:

                <select style='width: 120px;' id="combo_zone2" name="modelo">
                <option value="NA NA"></option>
                <%  if (Model.MarcaSeleccionada.Equals("")) { }
                    else
                    {
                        foreach (string mod in marcas[Model.MarcaSeleccionada])
                        {
                            string hola = Model.MarcaSeleccionada + " " + mod;
                        %>
                    <option value="<%= Html.Encode(hola) %>"><%= Html.Encode(mod)%></option>
                    <% }
                    }%>
                </select></div>
            <div class="tipo" align="right">
                Año:
                <select style='width: 120px;' id="combo_zone3" name="ano">
                    <option value="NA"></option>
                    <option value="2000">2000</option>
                    <option value="2001">2001</option>
                    <option value="2002">2002</option>
                    <option value="2003">2003</option>
                    <option value="2004">2004</option>
                    <option value="2005">2005</option>
                    <option value="2006">2006</option>
                    <option value="2007">2007</option>
                    <option value="2008">2008</option>
                    <option value="2009">2009</option>
                    <option value="2010">2010</option>
                </select></div>
            <div class="tipo" align="right">
                Kilometraje:
                <input type="text" title="Kilometraje"  name="kilometraje" 
                    style="width: 114px"/>
            </div>
            <div class="tipo" align="right">
                Tipo bencina:
                <select style='width: 120px;' id="combo_zone4" name="tipoBencina">
                    <option value="NA"></option>
                    <option value="93">93</option>
                    <option value="95">95</option>
                    <option value="97">97</option>
                    <option value="Diesel">Diesel</option>
                </select>
            </div>

            <div class="tipoa" align="right">
                <input class="buttonC" type="submit" value="Buscar"/>
            </div>
   </form>
        </div>
    </div>
</asp:Content>
